package com.example.design_pattern.singleton.threadsafe;

public class Singleton {

    // 静态初始化器中创建单件，保证了线程安全
    private static Singleton singletonUnique = new Singleton();;

    // 私有化构造器，防止外部调用
    private Singleton() {

    }

    public Singleton getInstance(){
        return singletonUnique;
    }
}
